﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace DAMS.Models
{
    public class Tag:BaseModel
    {
        public int ID { get; set; }
        [Required]
        [StringLength(8,ErrorMessage ="超出标签允许最大长度")]
        [Display(Name ="标签名称")]
        public string TagName { get; set; }
        public List<ArticleTag> ArticleTags { get; set; }
    }

    public class ArticleTag
    {
        public int ArticleID { get; set; }
        public Article Article { get; set; }

        public int TagID { get; set; }
        public Tag Tag { get; set; }
    }
}
